package bai9.model;

import java.util.Scanner;


public class Employee extends Person {
	private int employeeid;
	private double salary;
	private String username;
	private String email;
	public Employee(){
		
	}
	
	public Employee(String name, String birthofdate, String address,
			String gender, int employeeid, double salary, String username,
			String email) {
		super(name, birthofdate, address, gender);
		this.employeeid = employeeid;
		this.salary = salary;
		this.username = username;
		this.email = email;
	}
	

	public int getEmployeeid() {
		return employeeid;
	}

	public void setEmployeeid(int employeeid) {
		this.employeeid = employeeid;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	public Employee inputEmployee(){
		Scanner ip=new Scanner(System.in);
		super.inputPerson();
		System.out.println("Enter Employeeid: ");
		int employeeid=Integer.parseInt(ip.nextLine());
		System.out.println("Enter Salary: ");
		double salary=Double.parseDouble(ip.nextLine());
		System.out.println("Enter username: ");
		String username=ip.nextLine();
		System.out.println("Enter Email:");
		String email=ip.nextLine();	
		
		Employee emp=new Employee(name,birthofdate,address,gender,employeeid,salary,username,email);
		return emp;
	}
	public void display(Employee emp) {
		System.out.println("============================Danh sach Employee==============================\n");
		System.out.println("|Employeeid\t|Name\t\t\t|BirthOfDate\t|Address\t|Gender\t|Salary\t|Username\t|Email\n");
		System.out.println(emp.getEmployeeid()+"\t"+emp.getName()+"\t"+emp.getBirthofdate()+"\t"+emp.getAddress()+"\t"+emp.getGender()+"\t"+emp.getSalary()+"\t"+emp.getUsername()+"\t"+emp.getEmail());
	}

}
